package cn.itsource.pet.domain;

import cn.itsource.basic.domain.BaseDomain;
import cn.itsource.basic.domain.OrderSn;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;

@Data
@Table(name = "t_order_pet_acquisition")
public class OrderPetAcquisition implements BaseDomain , OrderSn {
    @Id
    private Long id;
    private String digest;
    //state 状态 待支付 待报账 待打款 已完成 已取消
    private String state;
    private BigDecimal price;
    private String orderSn;
    private String paySn;
    private Long petId;
    private Long userId;
    private Long payType;
    private Long shopId;
    private String address;
    private Long empId;
    private Boolean del;
    private Long messageId;
    //做订单的初始化方法
    public void init() {
        this.messageId = this.id;
        this.id = null;
        this.state = "1";
        //订单号
//        this.orderSn =
        //订单编号
        this.orderSn = this.createOrderSn();

    }
}
